<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>慢慢买首页</title>
    <link href="./lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="./css/base.css"/>
    <link rel="stylesheet" href="./css/index.css"/>
</head>
<body>
<!--首页-->
<!-- 顶栏 -->
<header class="container-fluid">
    <h1>慢慢买 http://m.manmanbuy.com/</h1>
    <a class="titName fl col-xs-8 col-sm-8 col-md-8" href="index.html">
        <img src="./images/header_logo.png" alt="慢慢买首页">
    </a>
    <div class="appDownload fr">
        <a href="#">
            <img src="./images/header_app.png" alt="慢慢买app下载">
        </a>
    </div>
</header>

<!-- 内容 -->
<section class="container-fluid">
    <!-- 搜索&导航 -->
    <aside>
        <!-- 搜索栏 -->
        <div class="search">
            <input class="col-xs-11" type="text" placeholder="请输入你想比价的商品">
            <button class="fr">搜索</button>
        </div>
        <!-- 导航栏 -->
        <div class="nav"></div>
        <script id="nav" type="text/html">
            <%if(result) {%>
                <%for(let i = 0; i < result.length/4; i++) {%>
                    <div>
                        <%for(let j = 0; j < 4; j++) {%>
                            <a class="col-xs-3">
                                <%=#result[4*i+j].img%>
                                <h3><%=result[4*i+j].name%></h3>
                            </a>
                        <%}%>
                    </div>
                <%}%>
            <%} else {%>
                页面获取数据出错，请点击
                <a style="color: red;" href="javascript:window.location.reload();">刷新页面</a>
            <%}%>
        </script>
    </aside>

    <!-- 推荐 -->
    <article>
        <!-- 首页推荐 -->
        <div class="home_comm clearfix">
            <a href="" class="comm_title">
                <h4 class="fl">超值折扣推荐</h4>
                <img class="fr" src="./images/more.png" alt="更多超值折扣推荐">
            </a>
            <ul class="comm_list col-xs-12 col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2"></ul>
            <script type="text/html" id="comm_list">
                <%if(result) {%>
                <%for(let i = 0, len = result.length; i < len; i++) {%>
                <li>
                    <a href="#">
                        <div class="clearfix">
                            <%=#result[i].productImgSm%>
                            <div class="pd">
                                <div class="pd_title">
                                    <%=result[i].productName%>
                                    <span><%=result[i].productPinkage%></span>
                                </div>
                                <div class="pd_url">
                                    <span><%=result[i].productFrom%> | <%=result[i].productTime%></span>
                                    <span class="comment fr">
                                        <i class="icon-comment"><%= getMan(result[i].productComCount) %></i>
                                    </span>
                                </div>
                            </div>
                        </div>
                    </a>
                </li>
                <%}%>
                <%} else {%>
                页面获取数据出错，请点击
                <a style="color: red;" href="javascript:window.location.reload();">刷新页面</a>
                <%}%>
            </script>
        </div>
        <!-- 更多优惠信息 -->
        <div class="comm_more">
            <a href="html/moneyctrl/moneyctrl.html">更多优惠信息 »</a>
        </div>
    </article>
</section>

<!-- 底栏 -->
<footer class="container-fluid">
    <!-- 品牌排行 -->
    <a href="" class="brand">
        <h4 class="fl">品牌排行</h4>
        <img class="fr" src="./images/more.png" alt="更多超值折扣推荐">
    </a>
    <div class="footerTop clearfix">
        <a class="col-xs-3" href="./html/home/login.html">登陆</a>
        <a class="col-xs-3" href="#">注册</a>
        <a id="returnTop" class="col-xs-6" href="#">
            <span>返回顶部</span>
        </a>
    </div>
    <div class="footerDown">
        <p>
            <a class="app_download" href="#">手机APP下载</a>
            <a href="index.html">慢慢买手机版</a>
            <span>--</span>
            <span>掌上比价平台</span>
        </p>
        <h2>m.manmanbuy.com</h2>
    </div>
</footer>

<!-- app广告 -->
<a id="appdl" href="javascript:;">
    <img src="./images/appdl.png" alt="app下载"/>
</a>

<script src="./lib/jquery/jquery.min.js"></script>
<script src="./lib/bootstrap/js/bootstrap.min.js"></script>
<script src="./js/index.js"></script>
<script src="./lib/artTemplate-3.0.1/template-native.js"></script>
</body>
</html>